Set up package publishing for daily, manual, and release builds#118
Merged
jeffhandley merged 17 commits intomodelcontextprotocol:mainfrom Mar 27, 2025
jeffhandley:jeffhandley/ci-build-packaging
Merged
Set up package publishing for daily, manual, and release builds#118jeffhandley merged 17 commits intomodelcontextprotocol:mainfrom jeffhandley:jeffhandley/ci-build-packaging
jeffhandley merged 17 commits intomodelcontextprotocol:mainfrom
jeffhandley:jeffhandley/ci-build-packaging
Conversation
Update CI TestResults folder
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR configures package publishing for daily, manual, and release builds by refactoring build properties and updating GitHub Actions workflows.
- Updated release workflow to trigger on a schedule, manual events, and GitHub releases while leveraging the ci.yml workflow
- Adjusted docs workflow to conditionally publish only for the specified repository
- Enabled workflow_call in the ci.yml workflow to support invocation from other workflows
Reviewed Changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/release.yml | Modified to include new triggers, dynamic version suffix handling, and updated job naming |
| .github/workflows/docs.yml | Added conditional publishing logic based on the repository name |
| .github/workflows/ci.yml | Enabled workflow_call to allow external invocation of the CI workflow |
Files not reviewed (4)
- Directory.Build.props: Language not supported
- src/Directory.Build.props: Language not supported
- src/ModelContextProtocol/ModelContextProtocol.csproj: Language not supported
- tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:38
- Ensure that the 'format' function used in the expression is supported in GitHub Actions. If not, consider an alternative approach for string formatting.
version_suffix_args: ${{ github.event_name != 'release' && format('--version-suffix "ci.{0}"', github.run_number) || '' }}
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR sets up package publishing for daily, manual, and release builds by updating GitHub Actions workflows.
- Updated the release workflow to include scheduled daily triggers, manual runs, and conditional NuGet publishing based on the repository.
- Added a conditional check to the docs workflow to publish documentation only from the specified repository.
- Modified the CI workflow to support workflow calls for better reusability.
Reviewed Changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/release.yml | Refined triggers and added conditional environment logic for version suffixing and publishing steps. |
| .github/workflows/docs.yml | Added a condition to ensure docs are published only from the modelcontextprotocol/csharp-sdk repo. |
| .github/workflows/ci.yml | Introduced workflow_call trigger for potential CI reusability. |
Files not reviewed (4)
- Directory.Build.props: Language not supported
- src/Directory.Build.props: Language not supported
- src/ModelContextProtocol/ModelContextProtocol.csproj: Language not supported
- tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj: Language not supported
Comments suppressed due to low confidence (2)
.github/workflows/release.yml:38
- [nitpick] Consider refactoring or simplifying the conditional expression for 'version_suffix_args' to improve readability and maintainability.
version_suffix_args: ${{ github.event_name != 'release' && format('--version-suffix "ci.{0}"', github.run_number) || '' }}
.github/workflows/release.yml:30
- [nitpick] The job name 'run-ci' could be more descriptive. Consider renaming it (for example, to 'ci-build') to clearly indicate its purpose.
run-ci:
eiriktsarpalis
approved these changes
Mar 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Directory.Build.propsandsrc/Directory.Build.propsto include new properties for artifact directories, versioning, and authorship. This results in all build output going into the top-levelartifactsfolder and NuGet packages produced from the/src/folder having the desired metadata..github/workflows/release.ymlto handle the publishing of NuGet packages, including daily and manual runs, as well as official releases. This workflow replaces the previous release workflow. The release workflow performs a build on all configs for validation, but it does not run tests. We need to make sure CI is green before minting a release.publish-docsjob in.github/workflows/docs.ymlto only publish from themodelcontextprotocol/csharp-sdkrepository.Daily and Manual Runs
/src/Directory.Build.propsci.{github.run_number}Official Releases
/src/Directory.Build.props/src/Directory.Build.props